package com.slofzx.nuoda.evaluation.project.enums;
import com.slofzx.nuoda.common.config.Type;

public enum ExportTemplateEnum implements Type {

    EXPORT("export","导出模板"),

    BATCH_EXPORT("batch_export","批量导出模板"),

    MERGE_EXPORT("merge_export","合并导出模板"),
    ;

    private String id;
    private String name;


    ExportTemplateEnum(String id, String name) {
        this.id = id;
        this.name = name;
    }

    @Override
    public String getId() {
        return id;
    }

    @Override
    public String getName() {
        return name;
    }

    /**
     * 根据id获取对应的枚举
     * @param id 枚举值的标识
     * @return
     */
    public static ExportTemplateEnum getEnum(String id){
        for(ExportTemplateEnum dataTypeEnum: ExportTemplateEnum.values()){
            if(dataTypeEnum.getId().equals(id)){
                return dataTypeEnum;
            }
        }
        return null;
    }
}
